package Test;

import java.util.ArrayList;
import java.util.Scanner;

public class s3 {


        public static void main(String[] args) {
            Scanner in = new Scanner(System.in);
            double size = in.nextDouble();
            String status = in.next();
            int price = 0;
            double epsilon = 1e-10;//一个无线接近于0的数
            while(true){

                if(size>1){
                    price+=(int)Math.floor(size-1)+20;
                    if(Math.abs(size-1)>epsilon){
                        price++;
                    }
                }else{
                    price+=20;
                }

                if(status.equals("y")){
                    price+=5;
                    break;
                }else{
                    break;
                }
            }




        }

}
